package com.mc.read.adminapi.controller;

import com.mc.read.adminapi.service.PcUserService;
import com.mc.read.vo.request.BaseRequest;
import com.mc.read.vo.respose.BaseRespose;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author liuhao
 * @date 2019/6/15 11:59
 * pc用户管理
 */
@Controller
@RequestMapping(value = "/verify/pcuser")
public class PcUserController {
    @Autowired
    PcUserService pcUserService;

    /**
     * @Author:LiuHao
     * @Date:15:24 2019/5/31
     * 用户列表展示 selectPcUserList
     **/
    @ResponseBody
    @RequestMapping(value = "selectPcUserList", method = RequestMethod.POST)
    public BaseRespose selectPcUserList(@RequestBody BaseRequest baseRequest) {
        BaseRespose baseRespose = pcUserService.selectPcUserList(baseRequest);
        return baseRespose;
    }

    /**
     * @Author:LiuHao
     * @Date:15:24 2019/5/31
     * 修改用户禁用状态 updateUserStaus
     **/
    @ResponseBody
    @RequestMapping(value = "updateUserStaus", method = RequestMethod.POST)
    public BaseRespose updateUserStaus(@RequestBody BaseRequest baseRequest) {
        BaseRespose baseRespose = pcUserService.updateUserStaus(baseRequest);
        return baseRespose;
    }

}
